from django.db import models

# Create your models here.

# #用户表
# class MUser(models.Model):
#     username = models.CharField(max_length=20)
#     password = models.CharField(max_length=200)
#     mobile =    models.CharField(max_length=11)
#     class Meta:
#         db_table = 'user'
#
# #区域表
# class MRegion(models.Model):
#     name = models.CharField(max_length=20)
#     fid = models.ForeignKey('self',on_delete=models.SET_NULL,null=True,blank=True)
#     class Meta:
#         db_table = 'region'
#
# class MUserAddress(models.Model):
#     pass


#新闻表
class MNew(models.Model):
    title = models.CharField(max_length=50)
    content = models.CharField(max_length=200)
    class Meta:
        db_table='mnew'
#广告表
class Madvertising(models.Model):
    picture = models.ImageField(default='',upload_to='upload')
    jumpaddress = models.CharField(max_length=50)
    cate = models.CharField(max_length=50)
    class Meta:
        db_table='madvertising'